package com.unicom.fragment;

import java.util.ArrayList;

import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.unicom.adapter.AllStoryAdapter;
import com.unicom.model.StoryModel;
import com.unicom.mystory.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class BookmarkFragment extends Fragment{
	private PullToRefreshListView bookmark_list_Story;
	private ArrayList<StoryModel> listStory = new ArrayList<StoryModel>(); 
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.bookmark_and_history_layout_fragment, container, false);
		bookmark_list_Story = (PullToRefreshListView) view.findViewById(R.id.bookmark_list_story);
		StoryModel item  = new StoryModel("1", "", "ai cho toi tinh yeu", "hoang van kien", 10, 10, 3);
		StoryModel item1 = new StoryModel("1", "", "ai cho toi tinh yeu", "hoang van kien", 10, 10, 3);
		StoryModel item2 = new StoryModel("1", "", "ai cho toi tinh yeu", "hoang van kien", 10, 10, 3);
		StoryModel item3 = new StoryModel("1", "", "ai cho toi tinh yeu", "hoang van kien", 10, 10, 3);
		StoryModel item4 = new StoryModel("1", "", "ai cho toi tinh yeu", "hoang van kien", 10, 10, 3);
		listStory.clear();
		listStory.add(item);
		listStory.add(item1);
		listStory.add(item2);
		listStory.add(item3);
		listStory.add(item4);
		AllStoryAdapter adapter = new AllStoryAdapter(listStory, getActivity());
		bookmark_list_Story.setAdapter(adapter);
		return view;
	}
}
